/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package posturecorrectionsystem.gui;

import java.awt.Color;
import java.awt.Toolkit;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JWindow;

/**
 *
 * @author ahmet
 */
public class VisualFeedback extends JWindow{
    public VisualFeedback() {
        getContentPane().setBackground(Color.green);
        setLocation(10, 10);
        setSize(20, 20);
        setVisible(true);

        final VisualFeedback vf = this;

        getContentPane().addMouseListener(new MouseAdapter() {

            @Override
            public void mouseClicked(MouseEvent me) {
                System.exit(0);
            }

            @Override
            public void mouseDragged(MouseEvent me) {
                super.mouseDragged(me);
                vf.setLocation(me.getPoint());
                
            }

        });
    }

    public static void main(String[] args) {
        new VisualFeedback();
    }

}
